import request from '@/utils/request'

// 获取客户列表
export function getProperties(params) {
  return request({
    url: '/properties',
    params
  })
}

// 获取客户数量
export function getPropertiesNum(params) {
  return request({
    url: '/properties/count',
    params
  })
}

// 获取指定客户
export function editPropertiesId(id) {
  return request({
    url: '/properties/' + id
  })
}

// 新增客户
export function addProperties(data) {
  return request({
    url: '/properties',
    method: 'post',
    data
  })
}

// 编辑客户
export function editProperties(data) {
  return request({
    url: '/properties/' + data.id,
    method: 'put',
    data
  })
}

// 删除客户
export function delProperties(id) {
  return request({
    url: '/properties/' + id,
    method: 'delete'
  })
}
